package momo.app.multicast.presence;

import java.util.HashMap;
import java.util.Vector;

/**
 * This class defined user-defined method that will be called by presence to get
 * users' vector clock and to return vector clocks from all other peers.
 * @author Sally Ang
 *
 */
public interface PresenceCallback {
    /**
     * Return local user name
     * @return
     */
    public String getUserName();
    
    /**
     * Return local data version
     * @return
     */
    public int getVersion();
    
    /**
     * Return local vector clock.
     * @return
     */
    public HashMap<String, Integer> getVectorClock();
    
    /**
     * Called when presence already received presence message from all other peers.
     * @param result List of peers' vector clock.
     */
    public void onReceivePresenceResult(Vector<PresenceMessage> result);
    
    public void onInitiatePresence();
    
    public void onConnected();
}
